import { Component } from '@angular/core';
import { NzPaginationModule } from 'ng-zorro-antd/pagination';

@Component({
  selector: 'app-pagination-item-render',
  standalone: true,
  imports: [NzPaginationModule],
  template: `
    <div class="demo">
      <nz-pagination [nzTotal]="500" [nzItemRender]="itemRenderTpl" />
      <ng-template #itemRenderTpl let-type let-page="page">
        @switch (type) { @case ('page') {
        <a>{{ page }}</a>
        } @case ('prev') {
        <a>上一页</a>
        } @case ('next') {
        <a>下一页</a>
        } @case ('prev_5') {
        <a><<</a>
        } @case ('next_5') {
        <a>>></a>
        } }
      </ng-template>
    </div>
  `,
  styles: ``,
})
export class PaginationItemRenderComponent {}
